home *** CD-ROM | disk | FTP | other *** search
- {
- [Scriptsettings]
- Scriptname=Create ordered list from selected lines
- ExecuteOnStartup=0
- ExecuteOnlyOnce=0
- }
- Program MakeList;
-
- function ListIt(s: string) : string;
- var
- i: integer;
- TempList: TStringList;
- Output: string;
- begin
- Output := '<ol>'+#13#10;
- TempList := TStringList.Create;
- TempList.Text := s;
- for i := 0 to TempList.Count - 1 do
- if TempList.Strings[i] <> '' then
- Output := Output + ' <li>'+TempList.Strings[i]+#13#10;
- Output := Output + '</ol>'+#13#10;
- Result := Output;
-
- end;
-
- var
- Code: string;
- begin
- Code := GetSelText;
- SetSelText(ListIt(Code));
- end.
-